package com.example.mystoryapp2.enums

enum class EnumRole {
    AUTHOR("author"),
    READER("reader");

    var value:String

    constructor(v:String){
        this.value = v
    }

    companion object{
        @JvmStatic
        fun getByValue(v:String):EnumRole{
            for (item in values()) {
                if(item.value==v){
                    return item;
                }
            }
            return READER;
        }
    }
}